const emailRegex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
const phoneRegex = /^[1][0-9]{10}$/;
const nameRegex = /^[\u4E00-\u9FA5A-Za-z0-9]+$/;
const idRegex = /^[A-Za-z0-9_-]+$/;

export function validateEmail(email: string) {
  console.log("验证邮箱：",email);
  return emailRegex.test(email);
};

export function validatePhone(phone: string) {
  console.log("验证手机号：",phone);
  return phoneRegex.test(phone);
};

export function validateName(name: string) {
  console.log("验证姓名：",name);
  return nameRegex.test(name);
};

export function validateId(id: string) {
  console.log("验证学会：",id);
  return idRegex.test(id);
};


